---
image: /generated/articles-docs-cloudrun-getsites.png
id: getsites
title: getSites()
slug: /cloudrun/getsites
crumb: 'Cloud Run API'
---

<ExperimentalBadge>
  <p>
    Cloud Run is in <a href="/docs/cloudrun/status">Alpha status and not actively being developed.</a>
  </p>
</ExperimentalBadge>

Gets an array of Remotion projects in Cloud Storage, in your GCP project.

The projects are located in the `sites/` subdirectory of your Cloud Storage bucket. Remember - you should only have one bucket for Remotion Cloud Run per region, therefore you do not need to specify the name of the bucket for this function.

## Example

Gets all sites and logs information about them.

```ts twoslash
import {getSites} from '@remotion/cloudrun';

const {sites, buckets} = await getSites('europe-west4');

for (const site of sites) {
  console.log(site.id); // A unique ID for referring to that project
  console.log(site.bucketName); // In which bucket the site resides in.
  console.log(site.bucketRegion); // In which region the bucket resides in.
  console.log(site.serveUrl); // URL of the deployed site that you can pass to `renderMediaOnCloudRun()`
}

for (const bucket of buckets) {
  console.log(bucket.name); // The name of the Cloud Storage bucket.
  console.log(bucket.creationDate); // A unix timestamp of when the site was created.
  console.log(bucket.region); // 'europe-west4'
}
```

## Arguments

An object with the following properties:

### `region`

The [GCP region](/docs/cloudrun/region-selection) which you want to query. Alternatively, you can pass 'all regions' to return sites across all regions.

```ts twoslash
import {getSites} from '@remotion/cloudrun';

const {sites, buckets} = await getSites('all regions');
```

## Return value

A promise resolving to an object with the following properties:

### `sites`

An array of deployed Remotion projects that you can use for rendering.

Each item contains the following properties:

#### `id`

A unique identifier for that project.

#### `bucketName`

The bucket in which the project resides in.

#### `bucketRegion`

The region in which the bucket resides in.

#### `serveUrl`

URL of the deployed site. You can pass it into [`renderMediaOnCloudRun()`](/docs/cloudrun/rendermediaoncloudrun) to render a video or audio.

### `buckets`

An array of all buckets in the selected region in your account that start with `remotioncloudrun-`.

:::info
You should only have [1 bucket](/docs/cloudrun/multiple-buckets) per region for all your Remotion projects.
:::

Each item contains the following properties:

#### `region`

The region the bucket resides in.

#### `name`

The name of the bucket. Cloud Storage buckets have globally unique names.

#### `creationDate`

A UNIX timestamp of the point when the bucket was first created.

## See also

- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/cloudrun/src/api/get-sites.ts)
- [deleteSite()](/docs/cloudrun/deletesite)
